$.noConflict();
jQuery().ready(function(){
    jQuery(".fancyBoletin").fancybox({
        'title'         :'Free Subscription',
        'transitionIn'	:'elastic',
        'transitionOut'	:'elastic',
        'speedIn'	:600, 
        'speedOut'	:200
    });
    jQuery(".fancybox").fancybox({
        'transitionIn'	:'elastic',
        'transitionOut'	:'elastic',
        'speedIn'	:600, 
        'speedOut'	:200
    });
    
    //Imagen de fondo
    jQuery.supersized({
        //Background image
        slides	:  [ {
            image : '/templates/sooner/media/images/bg_site.jpg'
        } ]					
    });
    jQuery.cacheImage('/templates/sooner/media/images/norepeathd.png');
    /*$.cacheImage('/templates/sooner/media/images/norepeathd.png',{
        load : function (e) {
            $('#logo').removeClass('loading').hide().addClass('logo').fadeIn(900);
        },
        error: function (e) {
            $('.slideshow img').hide();
        },
        abort: function (e) {
            $('.slideshow img').hide();
        }
    });*/
    jQuery.cacheImage('/templates/sooner/logotipo.png');
    jQuery('.logo,.holder img').cacheImage();
    jQuery("#logo").hide();
    
    //Mostrar el logo grande de 220px   
    jQuery('.holder').fadeIn(1500).delay(1000);
    
    //Animar movimiento de logo
    jQuery('.holder').animate({
        left: "20px",
        top: "18px",
        height: '108px'
    }, 2000, function() {        
        jQuery('#logo').removeClass('loading').addClass('logo').fadeIn(900);
        jQuery('.holder').fadeOut('slow').delay(1000);
        jQuery('#slideshow').addClass('loading');
        
        jQuery.ajax({
            url: '/es/slideshow-store/',
            success: function(data){      
                jQuery('#slideshow').html(data);
              
                setTimeout(function(){                                
                    jQuery('#slideshow').tabs({
                        fx:{
                            opacity: "toggle"
                        }
                    }).tabs("rotate", 5000, true);
                },1000);             
              
            }
        });
        
    });
});	

